﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace TCPServiceWithWindowsService
{
    /*
   * Ibraheem Osama Mohamed
   * @IbraheemOsamaMo
   */
    

    [ServiceContract]
    public interface IService1
    {
        [OperationContract]
        bool InsertEmployee(EmployeeTCP employee);

        [OperationContract]
        EmployeeTCP GetEmployeeWithID(string name);

        [OperationContract]
        List<EmployeeTCP> GetAllEmployee();

        [OperationContract]
        List<ZoneTCP> GetAllZone();

        [OperationContract]
        List<UserTCP> GetAllUser();

        [OperationContract]
        List<ClientTakenTCP> GetAllClientTaken();

        [OperationContract]
        List<NTIERS_XTCP> GetAllNTIERS_X();

        [OperationContract]
        List<TakenTCP> GetAllTaken();

        [OperationContract]
        List<ContractTCP> GetAllContract();

        [OperationContract]
        List<SystemParameterTCP> GetAllSystemParameter();

        [OperationContract]
        List<TakenAnalyzeTCP> GetAllTakenAnalyze();

        [OperationContract]
        List<NproduitTCP> GetAllNproduit();

        [OperationContract]
        List<SecteurTCP> GetAllSecteur();

        [OperationContract]
        List<PlanContTCP> GetAllPlanCont();

        [OperationContract]
        List<AnaPlanTCP> GetAllAnaPlan();


        [OperationContract]
        List<AnalyseTCP> GetAllAnalyse();
        
        [OperationContract]
        List<AnalyseProduitTCP> GetAllAnalyseProduit();

        [OperationContract]
        List<PtsurvTCP> GetAllPtsurv();

        [OperationContract]
        List<PtprelTCP> GetAllPtprel();

        [OperationContract]
        List<Ident01TCP> GetAllIdent01();

        [OperationContract]
        List<Ident02TCP> GetAllIdent02();

        [OperationContract]
        List<Ident03TCP> GetAllIdent03();

        [OperationContract]
        List<Ident04TCP> GetAllIdent04();

        [OperationContract]
        List<Ident05TCP> GetAllIdent05();

        [OperationContract]
        List<Ident06TCP> GetAllIdent06();

        [OperationContract]
        List<Ident07TCP> GetAllIdent07();

        [OperationContract]
        List<Ident08TCP> GetAllIdent08();

        [OperationContract]
        List<Ident09TCP> GetAllIdent09();

        [OperationContract]
        List<Ident10TCP> GetAllIdent10();

        [OperationContract]
        List<Ident11TCP> GetAllIdent11();

        [OperationContract]
        List<Ident12TCP> GetAllIdent12();

    }

    [DataContract]
    public class EmployeeTCP
    {
        private string Name;
        private string Postion;

        [DataMember]
        public string name
        {
            get { return Name; }
            set { Name = value; }
        }

        [DataMember]
        public string postion
        {
            get { return Postion; }
            set { Postion = value; }
        }
    }

    [DataContract]
    public class ZoneTCP
    {
        private int ID;
        private string Code;
        private string Label;

        [DataMember]
        public int id
        {
            get { return ID; }
            set { ID = value; }
        }

        [DataMember]
        public string code
        {
            get { return Code; }
            set { Code = value; }
        }

        [DataMember]
        public string label
        {
            get { return Label; }
            set { Label = value; }
        }
    }

    [DataContract]
    public class UserTCP
    {
        private int user_id;
        private string user_login;
        private string user_pwd;
        private Nullable<bool> user_is_admin;
        private Nullable<bool> user_is_tablet;
        private Nullable<bool> user_can_create_contract;
        private Nullable<bool> user_can_update_calypso;
        private string user_first_name;
        private string user_last_name;
        private string user_mail;
        private string user_phone;
        private Nullable<int> user_create;
        private Nullable<DateTime> date_create;

        [DataMember]
        public int id
        {
            get { return user_id; }
            set { user_id = value; }
        }

        [DataMember]
        public string login
        {
            get { return user_login; }
            set { user_login = value; }
        }

        [DataMember]
        public string pwd
        {
            get { return user_pwd; }
            set { user_pwd = value; }
        }

        [DataMember]
        public Nullable<bool> isadmin
        {
            get { return user_is_admin; }
            set { user_is_admin = value; }
        }

        [DataMember]
        public Nullable<bool> istablet
        {
            get { return user_is_tablet; }
            set { user_is_tablet = value; }
        }

        [DataMember]
        public Nullable<bool> iscontract
        {
            get { return user_can_create_contract; }
            set { user_can_create_contract = value; }
        }

        [DataMember]
        public Nullable<bool> iscalypso
        {
            get { return user_can_update_calypso; }
            set { user_can_update_calypso = value; }
        }

        [DataMember]
        public string fname
        {
            get { return user_first_name; }
            set { user_first_name = value; }
        }

        [DataMember]
        public string lname
        {
            get { return user_last_name; }
            set { user_last_name = value; }
        }

        [DataMember]
        public string mail
        {
            get { return user_mail; }
            set { user_mail = value; }
        }

        [DataMember]
        public string phone
        {
            get { return user_phone; }
            set { user_phone = value; }
        }

        [DataMember]
        public Nullable<int> usercreate
        {
            get { return user_create; }
            set { user_create = value; }
        }

        [DataMember]
        public Nullable<DateTime> datecreate
        {
            get { return date_create; }
            set { date_create = value; }
        }
    }

    [DataContract]
    public class ClientTakenTCP
    {
        [DataMember]
        public int client_taken_id { get; set; }
        [DataMember]
        public string client_taken_code { get; set; }
        [DataMember]
        public Nullable<int> zone_id { get; set; }
        [DataMember]
        public Nullable<int> cont_id { get; set; }
        [DataMember]
        public Nullable<int> user_create { get; set; }
        [DataMember]
        public Nullable<DateTime> date_create { get; set; }

    }

    [DataContract]
    public class NTIERS_XTCP
    {
        [DataMember]
        public string TX_CODE { get; set; }
        [DataMember]
        public string TX_SECT { get; set; }
        [DataMember]
        public string TX_REGION { get; set; }
        [DataMember]
        public string TX_PAYS { get; set; }
        [DataMember]
        public string TX_DEPT { get; set; }
        [DataMember]
        public string TX_GROUPE { get; set; }
        [DataMember]
        public string TX_TYPE { get; set; }
        [DataMember]
        public string TX_NOM { get; set; }
        [DataMember]
        public string TX_PRENOM { get; set; }
        [DataMember]
        public string TX_TITRE { get; set; }
        [DataMember]
        public string TX_VETO { get; set; }
        [DataMember]
        public string TX_ADR1 { get; set; }
        [DataMember]
        public string TX_ADR2 { get; set; }
        [DataMember]
        public string TX_ADR3 { get; set; }
        [DataMember]
        public string TX_INSEE { get; set; }
        [DataMember]
        public string TX_VILLE { get; set; }
        [DataMember]
        public string TX_CP { get; set; }
        [DataMember]
        public string TX_TEL { get; set; }
        [DataMember]
        public string TX_FAX { get; set; }
        [DataMember]
        public string TX_DATREF { get; set; }
        [DataMember]
        public string TX_NUM { get; set; }
        [DataMember]
        public string TX_CHEP { get; set; }
        [DataMember]
        public string TX_COM { get; set; }
        [DataMember]
        public string TX_MINI { get; set; }
        [DataMember]
        public string TX_BUL { get; set; }
        [DataMember]
        public double? TX_NBUL { get; set; }
        [DataMember]
        public string TX_RES { get; set; }
        [DataMember]
        public string TX_FAC { get; set; }
        [DataMember]
        public string TX_CODPAI { get; set; }
        [DataMember]
        public string TX_EMAIL { get; set; }
        [DataMember]
        public string TX_MAILACT { get; set; }
        [DataMember]
        public string TX_MESSAGE { get; set; }
        [DataMember]
        public string TX_MOBILE { get; set; }
        [DataMember]
        public string TX_MPSC { get; set; }
        [DataMember]
        public string TX_BP { get; set; }
        [DataMember]
        public string TX_NTVA { get; set; }
        [DataMember]
        public string TX_SIRET { get; set; }
        [DataMember]
        public double? TX_LATITUD { get; set; }
        [DataMember]
        public double? TX_LONGITU { get; set; }
        [DataMember]
        public string TX_ZONE { get; set; }
        [DataMember]
        public string TX_PERACT { get; set; }
        [DataMember]
        public string TX_ANAACT { get; set; }
        [DataMember]
        public string TX_DUREE { get; set; }
        [DataMember]
        public string TX_SSTRAIT { get; set; }
        [DataMember]
        public string TX_LANGUE { get; set; }
        [DataMember]
        public string TX_SANDRE { get; set; }
        [DataMember]
        public string TX_COMTOUR { get; set; }
        [DataMember]
        public string TX_EDITSEL { get; set; }
        [DataMember]
        public double? TX_ATEL { get; set; }
        [DataMember]
        public string TX_CODPRES { get; set; }
        [DataMember]
        public string TX_CODVET { get; set; }
        [DataMember]
        public string TX_PRES { get; set; }
        [DataMember]
        public string TX_VGC { get; set; }
    }

    [DataContract]
    public class TakenTCP {
        [DataMember]
        public int taken_id { get; set; }
        [DataMember]
        public string prod_code { get; set; }
        [DataMember]
        public string taken_type { get; set; }
        [DataMember]
        public string taken_code { get; set; }
        [DataMember]
        public Nullable<int> client_taken_id { get; set; }
        [DataMember]
        public string surv_code { get; set; }
        [DataMember]
        public string taken_point_code { get; set; }
        [DataMember]
        public string taken_point_label { get; set; }
        [DataMember]
        public Nullable<byte> taken_point_modifiable { get; set; }
        [DataMember]
        public Nullable<DateTime> taken_date { get; set; }
        [DataMember]
        public string days_taken { get; set; }
        [DataMember]
        public string months_taken { get; set; }
        [DataMember]
        public string years_taken { get; set; }
        [DataMember]
        public string taken_comment { get; set; }
        [DataMember]
        public Nullable<int> taken_point_day { get; set; }
        [DataMember]
        public Nullable<DateTime> taken_date_next { get; set; }
        [DataMember]
        public Nullable<DateTime> taken_date_last { get; set; }
        [DataMember]
        public Nullable<Decimal> amount { get; set; }
        [DataMember]
        public Nullable<int> user_create { get; set; }
        [DataMember]
        public Nullable<DateTime> date_create { get; set; }
    }

    [DataContract]
    public class ContractTCP
    {
        [DataMember]
        public int cont_id { get; set; }
        [DataMember]
        public string cont_number { get; set; }
        [DataMember]
        public Nullable<DateTime> date_start { get; set; }
        [DataMember]
        public Nullable<DateTime> date_end { get; set; }
        [DataMember]
        public string client_to_invoice { get; set; }
        [DataMember]
        public Nullable<bool> active { get; set; }
        [DataMember]
        public Nullable<int> user_create { get; set; }
        [DataMember]
        public Nullable<DateTime> date_create { get; set; }
    }

    [DataContract]
    public class SystemParameterTCP
    {
        [DataMember]
        public int sp_id { get; set; }
        [DataMember]
        public string sp_patch { get; set; }
    }

    [DataContract]
    public class TakenAnalyzeTCP
    {
        [DataMember]
        public int analyze_id { get; set; }
        [DataMember]
        public string analyze_code { get; set; }
        [DataMember]
        public string analyze_label { get; set; }
        [DataMember]
        public int taken_id { get; set; }
        [DataMember]
        public Nullable<bool> to_do { get; set; }
        [DataMember]
        public Nullable<int> user_create { get; set; }
        [DataMember]
        public Nullable<DateTime> date_create { get; set; }
    }

    [DataContract]
    public class NproduitTCP
    {
        [DataMember]
        public string PRD_CODE { get; set; }
        [DataMember]
        public string PRD_LIB { get; set; }
        [DataMember]
        public string PRD_LIBID1 { get; set; }
        [DataMember]
        public string PRD_LIBID2 { get; set; }
        [DataMember]
        public string PRD_LIBID3 { get; set; }
        [DataMember]
        public string PRD_LIBID4 { get; set; }
        [DataMember]
        public string PRD_LIBID5 { get; set; }
        [DataMember]
        public string PRD_LIBID6 { get; set; }
        [DataMember]
        public string PRD_LIBID7 { get; set; }
        [DataMember]
        public string PRD_LIBID8 { get; set; }
        [DataMember]
        public string PRD_LIBID9 { get; set; }
        [DataMember]
        public string PRD_LIBID10 { get; set; }
        [DataMember]
        public string PRD_LIBID11 { get; set; }
        [DataMember]
        public string PRD_LIBID12 { get; set; }
        [DataMember]
        public string PRD_TYPID { get; set; }
        [DataMember]
        public string PRD_OBLID { get; set; }
        [DataMember]
        public string PRD_TABL { get; set; }
    }

    [DataContract]
    public class SecteurTCP
    {
        [DataMember]
        public string SE_CODE { get; set; }
        [DataMember]
        public string SE_LIBELLE { get; set; }
     }

    [DataContract]
    public class PlanContTCP
    {
        [DataMember]
        public string PC_CODE { get; set; }
        [DataMember]
        public string PC_LIBELLE { get; set; }
    }

    [DataContract]
    public class AnaPlanTCP
    {
        [DataMember]
        public string AP_CODPLAN { get; set; }
        [DataMember]
        public string AP_CODANA { get; set; }
    }

    [DataContract]
    public class AnalyseTCP
    {
        [DataMember]
        public string AN_CODE { get; set; }
        [DataMember]
        public string AN_SECTEUR { get; set; }
        [DataMember]
        public string AN_LIBELLE { get; set; }
        [DataMember]
        public string AN_UNITE { get; set; }
    }

    [DataContract]
    public class AnalyseProduitTCP
    {
        [DataMember]
        public string AS_PROD { get; set; }
        [DataMember]
        public string AS_ANA { get; set; }
        [DataMember]
        public string AS_UNIT { get; set; }
        [DataMember]
        public string AS_ORI { get; set; }
    }

    [DataContract]
    public class PtsurvTCP
    {
        [DataMember]
        public string PS_CODE { get; set; }
        [DataMember]
        public string PS_LIBELLE { get; set; }
    }

    [DataContract]
    public class PtprelTCP
    {
        [DataMember]
        public string PP_CODSURV { get; set; }
        [DataMember]
        public string PP_CODPREL { get; set; }
        [DataMember]
        public string PP_LIBELLE { get; set; }
    }

    [DataContract]
    public class Ident01TCP
    {
        [DataMember]
        public string ID_VALEUR { get; set; }
    }

    [DataContract]
    public class Ident02TCP
    {
        [DataMember]
        public string ID_VALEUR { get; set; }
    }

    [DataContract]
    public class Ident03TCP
    {
        [DataMember]
        public string ID_VALEUR { get; set; }
    }

    [DataContract]
    public class Ident04TCP
    {
        [DataMember]
        public string ID_VALEUR { get; set; }
    }

    [DataContract]
    public class Ident05TCP
    {
        [DataMember]
        public string ID_VALEUR { get; set; }
    }

    [DataContract]
    public class Ident06TCP
    {
        [DataMember]
        public string ID_VALEUR { get; set; }
    }

    [DataContract]
    public class Ident07TCP
    {
        [DataMember]
        public string ID_VALEUR { get; set; }
    }

    [DataContract]
    public class Ident08TCP
    {
        [DataMember]
        public string ID_VALEUR { get; set; }
    }

    [DataContract]
    public class Ident09TCP
    {
        [DataMember]
        public string ID_VALEUR { get; set; }
    }

    [DataContract]
    public class Ident10TCP
    {
        [DataMember]
        public string ID_VALEUR { get; set; }
    }

    [DataContract]
    public class Ident11TCP
    {
        [DataMember]
        public string ID_VALEUR { get; set; }
    }

    [DataContract]
    public class Ident12TCP
    {
        [DataMember]
        public string ID_VALEUR { get; set; }
    }
}
